package com.chixing.day03_oop;

public class AccountTest {
    public static void main(String[] args) {
        Account acc1 =new Account();
        acc1.setAccNo(111);
        acc1.setAccName("老花");
        acc1.setAccPassword(54250);
        acc1.setAccTelno(12344321);
        acc1.setAccBalance(1222);
        acc1.setAccType(0);
        acc1.deposit(0);
        acc1.withdraw(0);

        if (acc1.getAccType()==0) {
            System.out.println(" 账户id：" + acc1.getAccNo() + " 账户名称：" + acc1.getAccName()
                    + " 账户密码：" + acc1.getAccPassword() + " 账户电话：" + acc1.getAccTelno()
                    + " 账户余额：" + acc1.getAccBalance() + " 账户种类:储蓄账户" );
        }else{
            System.out.println(" 账户id：" + acc1.getAccNo() + " 账户名称：" + acc1.getAccName()
                    + " 账户密码：" + acc1.getAccPassword() + " 账户电话：" + acc1.getAccTelno()
                    + " 账户余额：" + acc1.getAccBalance() + " 账户种类:信用账户" );
        }

        Account acc2 =new Account();
        acc2.setAccNo(112);
        acc2.setAccName("菊菊");
        acc2.setAccPassword(54438);
        acc2.setAccTelno(12344321);
        acc2.setAccBalance(1222);
        acc2.setAccType(1);
        acc2.deposit(1000);
        acc2.withdraw(500);

        Account acc3=acc2;
        acc3.setAccTelno(2222277777L) ;

        if (acc1.getAccType()==0) {
            System.out.println(" 账户id：" + acc2.getAccNo() + " 账户名称：" + acc2.getAccName()
                    + " 账户密码：" + acc2.getAccPassword() + " 账户电话：" + acc2.getAccTelno()
                    + " 账户余额：" + acc2.getAccBalance() + " 账户种类:储蓄账户" );
        }else{
            System.out.println(" 账户id：" + acc2.getAccNo() + " 账户名称：" + acc2.getAccName()
                    + " 账户密码：" + acc2.getAccPassword() + " 账户电话：" + acc2.getAccTelno()
                    + " 账户余额：" + acc2.getAccBalance() + " 账户种类:信用账户" );
        }



    }
}
